package lasec.connect;

import java.sql.Connection;
import java.util.ResourceBundle;

public abstract class ConnectionFactory {
	private static String DRIVER, URL, USERNAME, PASSWORD;
	
	public static ConnectionFactory getFactory() {
		ResourceBundle settings = ResourceBundle.getBundle("configConnect");
		DRIVER = settings.getString("driver");
		URL = settings.getString("url");
		USERNAME = settings.getString("username");
		PASSWORD = settings.getString("password");
		
		return new ConnectionFactoryImpl(DRIVER, URL, USERNAME, PASSWORD);
	}
	
	public abstract Connection getConnection();
}
